package com.joysuch.wwyt.edu.entity;

import cn.zlg.common.springmvc.validate.constraints.NotNull;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalTime;
import com.joysuch.wwyt.common.entity.UserDataEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

/**
 * <p>
 *
 * </p>
 *
 * @author pp
 * @since 2021-04-15
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("wwyt_edu_certificate")
@ApiModel(value="EduCertificate对象", description="")
public class WwytEduCertificate extends UserDataEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "ID")
    @TableId(value = "ID", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "名称",required = true)
    @TableField("NAME")
    @NotNull(message = "证书名称不能为空")
    @Length(max = 64, message = "证书名称不能超过64个字符")
    private String name;

    @ApiModelProperty(value = "编号",required = true)
    @TableField("CODE")
//    @NotNull(message = "证书类型字典编码不能为空")
    private String code;

    @ApiModelProperty(value = "证书有效期类型",required = true)
    @TableField("EFFECTIVE_TYPE")
    @NotNull(message = "证书有效期类型不能为空")
    private Integer effectiveType;

    @ApiModelProperty(value = "培训有效期（月）")
    @TableField("EFFECTIVE_DURATION_MONTH")
    private Integer effectiveDurationMonth;

    @ApiModelProperty(value = "状态")
    @TableField("STATE")
    private Integer state;

    @ApiModelProperty(value = "启用状态 1-启用/0-停用",required = true)
    @TableField("USE_STATE")
    @NotNull(message = "启用状态不能为空")
    private Integer useState;

    @ApiModelProperty(value = "证书类型--数据字典维护",required = true)
    @NotNull(message = "证书类型id不能为空")
    private Long certTypeId;

    @ApiModelProperty(value = "发证机构")
    private String releaseOrganization;

    @ApiModelProperty(value = "是否到期提醒 0 否 ; 1 是")
    @TableField("EXPIRE_REMIND_OR_NOT")
    private Boolean expireRemindOrNot;

    @ApiModelProperty(value = "到期提醒类型")
    @TableField("REMIND_TYPE")
    private String remindType;

    @ApiModelProperty(value = "提醒时间")
    @TableField("REMIND_TIME")
    private LocalTime remindTime;

    @ApiModelProperty(value = "提醒人json")
    @TableField("REMIND_USER_IDS_JSON")
    private String remindUserIdsJson;

    @ApiModelProperty(value = "提醒部门")
    @TableField("DEPART_ID")
    private Long departId;


}
